<h4><?=$t_noticias;?></h4>
<div id="accordion2" class="accordion">
    <?php
    $sql_noticia = "SELECT * FROM noticia WHERE sta_id='1' AND not_ok='1'";
    $res_noticia = sql($sql_noticia);
    $i = 0;
    while($linha_noticia = mysql_fetch_array($res_noticia)){
        if ($i == 0){ $in = " in"; } else { $in = ""; }
    ?>
    <div class="accordion-group">
      <div class="accordion-heading">
        <a href="#<?php echo $linha_noticia['not_id'];?>" data-parent="#<?php echo $linha_noticia['not_id'];?>" data-toggle="collapse" class="accordion-toggle">
          <?php echo $linha_noticia['not_nome']; ?>
        </a>
      </div>
      <div class="accordion-body collapse<?php echo $in; ?>" id="<?php echo $linha_noticia['not_id'];?>">
        <div class="accordion-inner">
            <?php 
            echo nl2br($linha_noticia['not_msg']);
            ?>
            <div class="image-row">
                  <?php
                    $sql_imagem = "SELECT * FROM midia WHERE mid_tipo='imagem' AND not_id='{$linha_noticia['not_id']}'";
                    $res_imagem = sql($sql_imagem);
                    while($linha_imagem = mysql_fetch_array($res_imagem)){
                  ?>
                  <a class="example-image-link" href="<?php echo $linha_imagem['mid_url'];?>" data-lightbox="example-1"><img class="example-image" src="<?php echo $linha_imagem['mid_url'];?>" alt="<?php echo $linha_imagem['mid_nome'];?>" width="200" height="200"/></a>
                  <?php } ?>
            </div> 
            <div>
                <?php
                $sql_video = "SELECT * FROM midia WHERE mid_tipo='video' AND mid_id='{$linha_noticia['not_id']}'";
                $res_video = sql($sql);
                $a = 0;
                while($linha_video = mysql_fetch_array($res_video)){
                    if ($a == 0){ echo "<br><br>"; }
                ?>
                <p><embed width='360' height='240' autoplay='false' loop='false' quality='high' src='<?=$linha_video['mid_url'];?>'></embed></p>
                <?php $a++; } ?>
            </div>
        </div>
      </div>
    </div>
    <?php 
    $i++; 
    } 
    ?> 
  </div>
<script src="plugin/lightbox/js/jquery-1.10.2.min.js"></script>
<script src="plugin/lightbox/js/lightbox-2.6.min.js"></script>
